package com.lxmes.pm.service.impl;

import java.util.List;
import com.lxmes.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.lxmes.pm.mapper.AProjectManageMapper;
import com.lxmes.pm.domain.AProjectManage;
import com.lxmes.pm.service.IAProjectManageService;

/**
 * 校级项目Service业务层处理
 * 
 * @author zhangzhiyu
 * @date 2023-04-04
 */
@Service
public class AProjectManageServiceImpl implements IAProjectManageService 
{
    @Autowired
    private AProjectManageMapper aProjectManageMapper;

    /**
     * 查询校级项目
     * 
     * @param id 校级项目主键
     * @return 校级项目
     */
    @Override
    public AProjectManage selectAProjectManageById(Long id)
    {
        return aProjectManageMapper.selectAProjectManageById(id);
    }

    /**
     * 查询校级项目列表
     * 
     * @param aProjectManage 校级项目
     * @return 校级项目
     */
    @Override
    public List<AProjectManage> selectAProjectManageList(AProjectManage aProjectManage)
    {
        return aProjectManageMapper.selectAProjectManageList(aProjectManage);
    }

    /**
     * 新增校级项目
     * 
     * @param aProjectManage 校级项目
     * @return 结果
     */
    @Override
    public int insertAProjectManage(AProjectManage aProjectManage)
    {
        aProjectManage.setCreateTime(DateUtils.getNowDate());
        return aProjectManageMapper.insertAProjectManage(aProjectManage);
    }

    /**
     * 修改校级项目
     * 
     * @param aProjectManage 校级项目
     * @return 结果
     */
    @Override
    public int updateAProjectManage(AProjectManage aProjectManage)
    {
        aProjectManage.setUpdateTime(DateUtils.getNowDate());
        return aProjectManageMapper.updateAProjectManage(aProjectManage);
    }

    /**
     * 批量删除校级项目
     * 
     * @param ids 需要删除的校级项目主键
     * @return 结果
     */
    @Override
    public int deleteAProjectManageByIds(Long[] ids)
    {
        return aProjectManageMapper.deleteAProjectManageByIds(ids);
    }

    /**
     * 删除校级项目信息
     * 
     * @param id 校级项目主键
     * @return 结果
     */
    @Override
    public int deleteAProjectManageById(Long id)
    {
        return aProjectManageMapper.deleteAProjectManageById(id);
    }
}
